Public Class ExcludeFields

	Protected m_prodid As String
	Protected m_exclusions As New Collection

	Public Sub New(ByVal prodid As String)

		m_prodid = prodid

		Dim sql As String
		Dim dbi As dbInterface = Globals.dbi
		Dim field As String
		sql = "select * from nymx_prod_exclusions where prod_id=" & dbi.quote(prodid)

		dbi.query(sql)

		While dbi.eof = False
			field = dbi.getval("exclusion")
			m_exclusions.Add(field)
			dbi.movenext()
		End While

	End Sub

	Public Function IsExcluded(ByVal field As String) As Boolean

		Dim x As Long
		For x = 1 To m_exclusions.Count
			If m_exclusions(x) = field Then
				Return True
			End If
		Next

		Return False
	End Function
End Class
